<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <object id="DWebSignSeal" classid='CLSID:77709A87-71F9-41AE-904F-886976F99E3E' codebase="<s:url value="/resources"/>/cab/WebSign.dll#version=4,0,6,0"
        width="0" height="0">
    </object>
    <object classid="clsid:707C7D52-85A8-4584-8954-573EFCE77488" id="JITDSignOcx" size="0"
        codebase="<s:url value="/resources"/>/cab/JITDSign.cab" width="0">
    </object>
    <link rel="stylesheet" href="<s:url value="/resources"/>/css/innerstyle.css" type="text/css" />
    <link rel="stylesheet" type="text/css" media="screen" href="<s:url value="/resources"/>/css/custom-theme/jquery-ui.custom.min.css" />	
	<script type="text/javascript" src="<s:url value="/resources"/>/js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="<s:url value="/resources"/>/js/jquery-ui.custom.min.js"></script> 
	<script type="text/javascript" src="<s:url value="/resources"/>/js/i18n/jquery.ui.datepicker-zh-CN.js"></script>
	<style type="text/css">

#tab{
	width:99%;
	border:#F4F4F4 solid 4px;
	padding:0 2px 0 2px;
	margin:0;
	float:left;
}


#tab h1{
	display:block;
	width:75%;
	height:55px;	
	float:left;
	text-align: center;
	margin:0px;
}
#tab h1 span{
	width:250px;
	font:bold 26px/55px Arial, Helvetica, sans-serif;
	color:#327C8E;
	background-color:#fff;
	display:block;
}
#tab h2{
	display:block;
	width:10%;
	height:55px;	
	float:left;
	padding-top:0;
}
#tab h2 span{
	width:250px;
	font:bold 26px/55px Arial, Helvetica, sans-serif;
	color:#000;
	background-color:#fff;
	display:block;
}

#tab h3{
	display:block;
	width:10%;
	height:55px;	
	float:left;
	padding-top:0;
}
#tab h3 span{
	width:300px;
	font:bold 26px/55px Arial, Helvetica, sans-serif;
	color:#000;
	background-color:#fff;
	display:block;
}
#tab h4{
	display:block;
	width:95%;	
	float:left;
	text-align: center;
	margin:0px;
}

.content1
{
	margin:0px;	
	padding:0px;
	width:100%;	
	font-size:12px;	
}
.content1 td
{    
    height:16px;
	line-height:16px;
	text-align:left;
	border-top-style:none;
	border-left-style:none;
	border-right-style:none;
	border-bottom-style:none;
}
label{ display:block; }
fieldset { padding:0; border:0; margin-top:0; }
</style>
<style media=print type="text/css">   
.noprint{visibility:hidden}   
</style>
</head>


<script language="JavaScript" type="text/javascript">
  
function showyinzhang(qzlx){
	//1买2中心0卖
	//alert(qzlx);

	
	var url = "<s:url value="/"/>/htgl/loadqzinfo";
	$.post(url,{ hetid: '${htinfo.hetid}', qzlx: qzlx },function(data){   
		var json = eval('(' + data + ')');
		
		var yinzhang=json.result;
		
		if(qzlx=="0"){
    		
    		if(yinzhang!=""){
    			
    			$("#cmrqz img").attr("src","data:image/gif;base64,"+yinzhang);
	    		$("#cmrqz").show();
    		}
    		
    	}
    	if(qzlx=="1"){
    		//
    		if(yinzhang!=""){
	    		$("#msrqz img").attr("src","data:image/gif;base64,"+yinzhang);
	    		$("#msrqz").show();
    		}
    	}
    	if(qzlx=="2"){
    		//
    		if(yinzhang!=""){
	    		$("#zxqz img").attr("src","data:image/gif;base64,"+yinzhang);
	    		$("#zxqz").show();
    		}
    	}
	});
	
}

$(function(){  
	$("#cmrqz").hide();
	$("#msrqz").hide();
	$("#zxqz").hide();
	showyinzhang(0);
	showyinzhang(1);
	showyinzhang(2);
});

</script>
<body>
<OBJECT   id=WebBrowser   classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2   height=0   width=0> </OBJECT>
	
	<div id="tab">	
        <h4>煤炭交易合同</h4>
      	
		<h2><span>(${htinfo.hetxsname})</span></h2>		
			<table id="list_search" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td width="120">出卖人（销方）:</td>
					<td width="30%">${htinfo.chumdwmc}</td>
					<td width="120">企业合同号:</td>
					<td width="20%">${htinfo.hetlrbh}</td>
					<td width="150">发站:</td>
					<td >${htinfo.fazmch}</td>
				</tr>

				<tr>
					<td>买受人（购方）:</td>
					<td>${htinfo.maisdwmc}</td>
					<td>签约地点:</td>
					<td>中国(太原)煤炭交易中心	</td>
					<td>到站:</td>
					<td>${htinfo.daozmch}</td>
				</tr>

				<tr>
					<td>发货单位:</td>
					<td>${htinfo.fahdwmc}</td>
					<td>签订时间:</td>
					<td>${htinfo.qianysj}</td>
					<td>隶属行业:</td>
					<td>${htinfo.hangylsname}</td>
				</tr>
				<tr>
					<td>是否中长期合同:</td>
					<td>  <c:if test="${htinfo.iszcx==0}">否</c:if><c:if test="${htinfo.iszcx==1}">是</c:if></td>
					<td>价格类型:</td>
					<td>${htinfo.jiaglxmc}</td>
					<td>到达省市:</td>
					<td>${htinfo.daodssdmc}</td>
				</tr>
				
				

				<tr>
					<td colspan="6" style="padding-top:5px;">一、收货人名称、品种规格、数量、单价</td>
				</tr>
				<tr>
					<td colspan="6" style="padding:1px;">
						<table id="changdi" align="center" cellpadding="0" cellspacing="0" border="1"
							class="content_gridview" >
							<thead>
								<tr>
									<th rowspan="3">收货人名称</th>
									<th rowspan="3">品种规格</th>
									<th rowspan="3">质量指标</th>
									<th rowspan="3">价格<br/>(元/吨)</th>
									<th colspan="13">交（提）货时间、煤量（吨）</th>

								</tr>
								<tr>
									<th rowspan="2">全年合计</th>
									<th colspan="3">一季度</th>
									<th colspan="3">二季度</th>
									<th colspan="3">三季度</th>
									<th colspan="3">四季度</th>
								</tr>
								<tr>
									<th>1</th>
									<th>2</th>
									<th>3</th>
									<th>4</th>
									<th>5</th>
									<th>6</th>
									<th>7</th>
									<th>8</th>
									<th>9</th>
									<th>10</th>
									<th>11</th>
									<th>12</th>
								</tr>
							</thead>
							<tbody>
									<tr>
										<td>${htinfo.shouhdwmc}</td>
										<td>${htinfo.pinzgg}</td>
										<td>${htinfo.zhilzb}</td>
										<td><div id="jiag"><fmt:formatNumber value="${htinfo.jiag}" pattern="###.##"/></div></td>
										<td>
										 <c:choose>  
											 <c:when test="${htinfo.shul == '' || empty htinfo.shul}">
											     0
											 </c:when>  
											 <c:otherwise>
											     <fmt:formatNumber value="${htinfo.shul}" pattern="###"/>
											 </c:otherwise>  
									     </c:choose>  
										</td>
										<td>
										 <c:choose>  
											 <c:when test="${htinfo.gml1 == '' || empty htinfo.gml1}">
											     0
											 </c:when>  
											 <c:otherwise>
											     <fmt:formatNumber value="${htinfo.gml1}" pattern="###"/>
											 </c:otherwise>  
									     </c:choose>  
										</td>
										<td>
										 <c:choose>  
											 <c:when test="${htinfo.gml2 == '' || empty htinfo.gml2}">
											     0
											 </c:when>  
											 <c:otherwise>
											     <fmt:formatNumber value="${htinfo.gml2}" pattern="###"/>
											 </c:otherwise>  
									     </c:choose>  
										</td>
										<td>
										 <c:choose>  
											 <c:when test="${htinfo.gml3 == '' || empty htinfo.gml3}">
											     0
											 </c:when>  
											 <c:otherwise>
											     <fmt:formatNumber value="${htinfo.gml3}" pattern="###"/>
											 </c:otherwise>  
									     </c:choose>  
										</td>
										<td>
										 <c:choose>  
											 <c:when test="${htinfo.gml4 == '' || empty htinfo.gml4}">
											     0
											 </c:when>  
											 <c:otherwise>
											     <fmt:formatNumber value="${htinfo.gml4}" pattern="###"/>
											 </c:otherwise>  
									     </c:choose>  
										</td>
										<td>
										 <c:choose>  
											 <c:when test="${htinfo.gml5 == '' || empty htinfo.gml5}">
											     0
											 </c:when>  
											 <c:otherwise>
											     <fmt:formatNumber value="${htinfo.gml5}" pattern="###"/>
											 </c:otherwise>  
									     </c:choose>  
										</td>
										<td>
										 <c:choose>  
											 <c:when test="${htinfo.gml6 == '' || empty htinfo.gml6}">
											     0
											 </c:when>  
											 <c:otherwise>
											     <fmt:formatNumber value="${htinfo.gml6}" pattern="###"/>
											 </c:otherwise>  
									     </c:choose>  
										</td>
										<td>
										 <c:choose>  
											 <c:when test="${htinfo.gml7 == '' || empty htinfo.gml7}">
											     0
											 </c:when>  
											 <c:otherwise>
											     <fmt:formatNumber value="${htinfo.gml7}" pattern="###"/>
											 </c:otherwise>  
									     </c:choose>  
										</td>
										<td>
										 <c:choose>  
											 <c:when test="${htinfo.gml8 == '' || empty htinfo.gml8}">
											     0
											 </c:when>  
											 <c:otherwise>
											     <fmt:formatNumber value="${htinfo.gml8}" pattern="###"/>
											 </c:otherwise>  
									     </c:choose>  
										</td>
										<td>
										 <c:choose>  
											 <c:when test="${htinfo.gml9 == '' || empty htinfo.gml9}">
											     0
											 </c:when>  
											 <c:otherwise>
											     <fmt:formatNumber value="${htinfo.gml9}" pattern="###"/>
											 </c:otherwise>  
									     </c:choose>  
										</td>
										<td>
										 <c:choose>  
											 <c:when test="${htinfo.gml10 == '' || empty htinfo.gml10}">
											     0
											 </c:when>  
											 <c:otherwise>
											     <fmt:formatNumber value="${htinfo.gml10}" pattern="###"/>
											 </c:otherwise>  
									     </c:choose>  
										</td>
										<td>
										 <c:choose>  
											 <c:when test="${htinfo.gml11 == '' || empty htinfo.gml11}">
											     0
											 </c:when>  
											 <c:otherwise>
											     <fmt:formatNumber value="${htinfo.gml11}" pattern="###"/>
											 </c:otherwise>  
									     </c:choose>  
										</td>
										<td>
										 <c:choose>  
											 <c:when test="${htinfo.gml12 == '' || empty htinfo.gml12}">
											     0
											 </c:when>  
											 <c:otherwise>
											     <fmt:formatNumber value="${htinfo.gml12}" pattern="###"/>
											 </c:otherwise>  
									     </c:choose>  
										</td>
									</tr>
							</tbody>
						</table></td>
				</tr>

				<tr style="line-height:26px;">
					<td colspan="6">
						<table id="djtk" cellpadding="0" cellspacing="0"  class="content1"  >

							<c:forEach var="tk" items="${djtk}">
								<tr>
									<td width="400px">${tk.xh}${tk.biaot}</td>
									<td style="width:86%;height:30px"><div>${tk.neir}</div></td>									
								</tr>
							</c:forEach>
						</table></td>
				</tr>
				<tr>
					<td colspan="6">
						<table cellpadding="0" cellspacing="0" style="width:100%" border="1"
							class="content_gridview">
							<thead>
								<tr>
									<th colspan="2">出卖人</th>
									<th colspan="2">买受人</th>
									<th>鉴（公）证单位：</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>
										<table cellpadding="0" cellspacing="0" border="0"
											class="content1">
											<tr>
												<td>出卖人名称(章)：</td>
												<td>${htinfo.chumdwmc}</td>
											</tr>
											<tr>
												<td>住 所:</td>
												<td>${htinfo.chumdwdz}</td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td>${htinfo.chumdwfddbr}</td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td>${htinfo.chumdwwtdlr}</td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td>${htinfo.chumdwdh}</td>
											</tr>
											<tr>
												<td>传真:</td>
												<td>${htinfo.chumdwcz}</td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td>${htinfo.chumdwyzbm}</td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td>${htinfo.chumdwkhyh}</td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td>${htinfo.chumdwzh}</td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td>${htinfo.chumdwnsrdjh}</td>
											</tr>

										</table></td>
									<td><table cellpadding="0" cellspacing="0" border="0"
											class="content1">
											<tr>
												<td>出卖人结算单位名称(章)：</td>
												<td>${htinfo.chumdwjsrmc}</td>
											</tr>
											<tr>
												<td>住 所:</td>
												<td>${htinfo.chumdwjsrdz}</td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td>${htinfo.chumdwjsrfddbr}</td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td>${htinfo.chumdwjsrwtdlr}</td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td>${htinfo.chumdwjsrdh}</td>
											</tr>
											<tr>
												<td>传真:</td>
												<td>${htinfo.chumdwjsrcz}</td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td>${htinfo.chumdwjsryzbm}</td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td>${htinfo.chumdwjsrkhyh}</td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td>${htinfo.chumdwjsrzh}</td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td>${htinfo.chumdwjsrnsrdjh}</td>
											</tr>

										</table>
									</td>
									<td><table cellpadding="0" cellspacing="0" border="0"
											class="content1">
											<tr>
												<td>买受人名称(章)：</td>
												<td>${htinfo.maisdwmc}</td>
											</tr>
											<tr>
												<td>住 所:</td>
												<td>${htinfo.maisdwdz}</td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td>${htinfo.maisdwfddbr}
												</td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td>${htinfo.maisdwwtdlr}
												</td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td>${htinfo.maisdwdh}</td>
											</tr>
											<tr>
												<td>传真:</td>
												<td>${htinfo.maisdwcz}</td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td>${htinfo.maisdwyzbm}</td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td>${htinfo.maisdwkhyh}</td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td>${htinfo.maisdwzh}</td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td>${htinfo.maisdwnsrdjh}
												</td>
											</tr>

										</table>
									</td>
									<td><table cellpadding="0" cellspacing="0" border="0"
											class="content1">
											<tr>
												<td>买受人结算单位名称(章)：</td>
												<td>${htinfo.maisdwjsrmc}</td>
											</tr>
											<tr>
												<td>住 所:</td>
												<td>${htinfo.maisdwjsrdz}</td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td>${htinfo.maisdwjsrfddbr}</td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td>${htinfo.maisdwjsrwtdlr}</td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td>${htinfo.maisdwjsrdh}</td>
											</tr>
											<tr>
												<td>传真:</td>
												<td>${htinfo.maisdwjsrcz}</td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td>${htinfo.maisdwjsryzbm}</td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td>${htinfo.maisdwjsrkhyh}</td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td>${htinfo.maisdwjsrzh}</td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td>${htinfo.maisdwjsrnsrdjh}</td>
											</tr>

										</table>
									</td>
									<td rowspan="2">
									<div algin="left">经办人：</div>&nbsp;
									<br/><br/><br/><br/>
									
									鉴（公）证机构（章）<br/>年 月  日
									</td>
								</tr>
							</tbody>
						</table></td>

				</tr>
				<tr>		
					<td colspan="6" align="right"><font size="2">年度：${htinfo.nianf} </font>&nbsp;&nbsp;&nbsp;&nbsp;<font size="2">合同有效期：${htinfo.youxqxkssj} 至 ${htinfo.youxqxjssj}</font>
					</td>
				</tr>

				<tr>
					<td colspan="6" align="center">					
						
						<input id="guanbi" class="noprint" type="button" name="" value="关闭" onclick="window.history.go(-1);window.close();" /> 										
					</td>
				</tr>

			</table>
		
	</div>
	 <div style="position:absolute;top:700px;left:350px;width:200px;height:200px;" id="cmrqz">
    <img src="" alt="" width="200" height="200"/>
    </div>
    <div style="position:absolute;top:700px;left:950px;width:200px;height:200px;" id="msrqz">
    <img src="" alt="" width="200" height="200"/>
    </div>
    <div style="position:absolute;top:700px;left:1200px;width:200px;height:200px;" id="zxqz">
    <img src="" alt="" width="200" height="200"/>
    </div>	
</body>
</html>
